//
//  string_replace.hpp
//  cpp_algorithm
//
//  Created by 李贺 on 2021/12/13.
//

#ifndef string_replace_hpp
#define string_replace_hpp

#include <stdio.h>
#include <vector>
#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;

typedef int fucksize;

class Solution_string_replace {
    
public:
    string replace_some(string s) {
        
        for (fucksize i = 0; i < s.size(); i++) {
            
            if (s[i] == ' ') {
                s.replace(i, sizeof(char), "20%");
            }
        }
        return s;
    }
    
    void test() {
        string ss = "a b c";
        string re = replace_some(ss);
        cout << re << endl;
    }
};

#endif /* string_replace_hpp */
